<?php

/**
 * cmContact form.
 *
 * @package    CeeVee
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class cmContactForm extends BasecmContactForm
{
  public function configure()
  {

      $this->embedRelations(array(
        'cmAddress' => array(
        'considerNewFormEmptyFields'    => array('street, zipcode, city, country'),
//        'noNewForm'                     => true,
        'newFormLabel'                  => 'Addresse',
//        'newFormClass'                  => 'cmEmailForm',
//        'newFormClassArgs'              => array(array('sf_user' => $this->getOption('sf_user'))),
//        'displayEmptyRelations'         => false,
//        'formClass'                     => 'cmEmailForm',
//        'formClassArgs'                 => array(array('ah_add_delete_checkbox' => true)),
//        'newFormAfterExistingRelations' => true,
//        'multipleNewForms'              => true,
//        'newFormsInitialCount'          => 2,
//        'newFormsContainerForm'         => null, // pass BaseForm object here or we will create ahNewRelationsContainerForm
//        'newRelationButtonLabel'        => '+',
//        'newRelationAddByCloning'       => true,
//        'newRelationUseJSFramework'     => 'jQuery',
//        'customEmbeddedFormLabelMethod' => 'getLabelTitle'
        ),
        'cmPhones' => array(
        'considerNewFormEmptyFields'    => array('number, type_id'),
//        'noNewForm'                     => true,
        'newFormLabel'                  => 'Telefonnummern',
//        'newFormClass'                  => 'cmEmailForm',
//        'newFormClassArgs'              => array(array('sf_user' => $this->getOption('sf_user'))),
//        'displayEmptyRelations'         => false,
//        'formClass'                     => 'cmEmailForm',
//        'formClassArgs'                 => array(array('ah_add_delete_checkbox' => true)),
//        'newFormAfterExistingRelations' => true,
        'multipleNewForms'              => true,
        'newFormsInitialCount'          => 2,
//        'newFormsContainerForm'         => null, // pass BaseForm object here or we will create ahNewRelationsContainerForm
        'newRelationButtonLabel'        => '+',
        'newRelationAddByCloning'       => true,
        'newRelationUseJSFramework'     => 'jQuery',
        'customEmbeddedFormLabelMethod' => 'getLabelTitle'
        ),
        'cmEmails' => array(
        'considerNewFormEmptyFields'    => array('email'),
//        'noNewForm'                     => true,
        'newFormLabel'                  => 'Emails',
//        'newFormClass'                  => 'cmEmailForm',
//        'newFormClassArgs'              => array(array('sf_user' => $this->getOption('sf_user'))),
//        'displayEmptyRelations'         => false,
//        'formClass'                     => 'cmEmailForm',
//        'formClassArgs'                 => array(array('ah_add_delete_checkbox' => true)),
//        'newFormAfterExistingRelations' => true,
        'multipleNewForms'              => true,
        'newFormsInitialCount'          => 2,
//        'newFormsContainerForm'         => null, // pass BaseForm object here or we will create ahNewRelationsContainerForm
        'newRelationButtonLabel'        => '+',
        'newRelationAddByCloning'       => true,
        'newRelationUseJSFramework'     => 'jQuery',
        'customEmbeddedFormLabelMethod' => 'getLabelTitle'
        ),
        'cmSocialMedias' => array(
        'considerNewFormEmptyFields'    => array('profile, site_id'),
//        'noNewForm'                     => true,
        'newFormLabel'                  => 'Social Media',
//        'newFormClass'                  => 'cmEmailForm',
//        'newFormClassArgs'              => array(array('sf_user' => $this->getOption('sf_user'))),
//        'displayEmptyRelations'         => false,
//        'formClass'                     => 'cmEmailForm',
//        'formClassArgs'                 => array(array('ah_add_delete_checkbox' => true)),
//        'newFormAfterExistingRelations' => true,
        'multipleNewForms'              => true,
        'newFormsInitialCount'          => 2,
//        'newFormsContainerForm'         => null, // pass BaseForm object here or we will create ahNewRelationsContainerForm
        'newRelationButtonLabel'        => '+',
        'newRelationAddByCloning'       => true,
        'newRelationUseJSFramework'     => 'jQuery',
        'customEmbeddedFormLabelMethod' => 'getLabelTitle'
        ),
        'cmInstantMessengers' => array(
        'considerNewFormEmptyFields'    => array('account, software_id'),
//        'noNewForm'                     => true,
        'newFormLabel'                  => 'Instant Messengers',
//        'newFormClass'                  => 'cmEmailForm',
//        'newFormClassArgs'              => array(array('sf_user' => $this->getOption('sf_user'))),
//        'displayEmptyRelations'         => false,
//        'formClass'                     => 'cmEmailForm',
//        'formClassArgs'                 => array(array('ah_add_delete_checkbox' => true)),
//        'newFormAfterExistingRelations' => true,
        'multipleNewForms'              => true,
        'newFormsInitialCount'          => 2,
//        'newFormsContainerForm'         => null, // pass BaseForm object here or we will create ahNewRelationsContainerForm
        'newRelationButtonLabel'        => '+',
        'newRelationAddByCloning'       => true,
        'newRelationUseJSFramework'     => 'jQuery',
        'customEmbeddedFormLabelMethod' => 'getLabelTitle'
        ),
        'cmUrls' => array(
        'considerNewFormEmptyFields'    => array('title, url'),
//        'noNewForm'                     => true,
        'newFormLabel'                  => 'Webseiten',
//        'newFormClass'                  => 'cmEmailForm',
//        'newFormClassArgs'              => array(array('sf_user' => $this->getOption('sf_user'))),
//        'displayEmptyRelations'         => false,
//        'formClass'                     => 'cmEmailForm',
//        'formClassArgs'                 => array(array('ah_add_delete_checkbox' => true)),
//        'newFormAfterExistingRelations' => true,
        'multipleNewForms'              => true,
        'newFormsInitialCount'          => 2,
//        'newFormsContainerForm'         => null, // pass BaseForm object here or we will create ahNewRelationsContainerForm
        'newRelationButtonLabel'        => '+',
        'newRelationAddByCloning'       => true,
        'newRelationUseJSFramework'     => 'jQuery',
        'customEmbeddedFormLabelMethod' => 'getLabelTitle'
        ),
    ));
    $this->embedI18n(array('de', 'en'));
    $this->widgetSchema->setLabels(array(
        'title'      => 'Titel',
        'type_id'       => 'Typ'
    ));
    
    $this->widgetSchema->setHelps(array(
        'title'      => 'Gib hier einen Namen für die Social Media Seite ein.',
        'type_id'       => 'Gib hier die URL(beginnend mit "http://") der Social Media Seite ein.'
    )); 
    
  }
}
